<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>新函数</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="migration53.parameters.html">新参数</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="migration53.new-stream-wrappers.html">新的流包装器</a></div>
 <div class="up"><a href="migration53.html">从 PHP 5.2.x 移植到 PHP 5.3.x</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="migration53.functions" class="section">
  <h2 class="title">新函数</h2>
  <p class="simpara">
   PHP 5.3 引入了一些新函数:
  </p>

  <p class="simpara">PHP 核心:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.array-replace.html" class="function">array_replace()</a></span>
     - 将一个数组的元素用另外一个数组的元素进行替换.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.array-replace-recursive.html" class="function">array_replace_recursive()</a></span>
     - 将一个数组的元素用一组传递进来的数组进行递归替换.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.class-alias.html" class="function">class_alias()</a></span>
     - 为用户定义的类创建一个别名.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.forward-static-call.html" class="function">forward_static_call()</a></span>
     - 从一个方法环境调用一个用户函数.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.forward-static-call-array.html" class="function">forward_static_call_array()</a></span>
     - 从一个方法环境调用一个用户函数, 使用数组中的元素作为参数.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.gc-collect-cycles.html" class="function">gc_collect_cycles()</a></span>
     - 强制收集任何存在的废物循环.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.gc-disable.html" class="function">gc_disable()</a></span>
     - 撤销循环引用收集器.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.gc-enable.html" class="function">gc_enable()</a></span>
     - 激活循环引用收集器.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.gc-enabled.html" class="function">gc_enabled()</a></span>
     - 返回循环引用收集器的状态.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.get-called-class.html" class="function">get_called_class()</a></span>
     - 返回调用的静态方法所在的类的名称.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.gethostname.html" class="function">gethostname()</a></span>
     - 返回本地机器的当前主机名.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.header-remove.html" class="function">header_remove()</a></span>
     - 在使用 <span class="function"><a href="function.header.html" class="function">header()</a></span> 函数之前移除 HTTP Header.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.lcfirst.html" class="function">lcfirst()</a></span>
     - 蒋某一字符串第一个字符转化为小写.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.parse-ini-string.html" class="function">parse_ini_string()</a></span>
     - 解析配置字符串.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.quoted-printable-encode.html" class="function">quoted_printable_encode()</a></span>
     - 转换 8 位的字符串为引用的可打印字符串.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.str-getcsv.html" class="function">str_getcsv()</a></span>
     - 将 CSV 字符串解析为数组.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.stream-context-set-default.html" class="function">stream_context_set_default()</a></span>
     - 设置默认的流环境.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.stream-supports-lock.html" class="function">stream_supports_lock()</a></span>
     - 如果流支持锁定则返回 <strong><code>TRUE</code></strong>.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.stream-context-get-params.html" class="function">stream_context_get_params()</a></span>
     - 获取一个流环境的参数.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="streamwrapper.stream-cast.html" class="function">streamWrapper::stream_cast()</a></span>
     - 获取底层的流资源.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="streamwrapper.stream-set-option.html" class="function">streamWrapper::stream_set_option()</a></span>
     - 更改流选项
    </span>
   </li>
  </ul>

  <p class="simpara"><a href="book.datetime.html" class="link">Date/Time</a>:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.date-add.html" class="function">date_add()</a></span>
     - 向 <a href="class.datetime.html" class="classname">DateTime</a> 对象增加一定数量的天, 月, 年, 小时, 分钟和秒数.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.date-create-from-format.html" class="function">date_create_from_format()</a></span>
     - 根据给定的格式, 返回一个 <a href="class.datetime.html" class="classname">DateTime</a> 对象.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.date-diff.html" class="function">date_diff()</a></span>
     - 返回两个 <a href="class.datetime.html" class="classname">DateTime</a> 对象的不同之处.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.date-get-last-errors.html" class="function">date_get_last_errors()</a></span>
     - 返回最后的日期/时间操作中产生的警告和错误.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.date-parse-from-format.html" class="function">date_parse_from_format()</a></span>
     - 获取一个日期的信息.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.date-sub.html" class="function">date_sub()</a></span>
     - 从 <a href="class.datetime.html" class="classname">DateTime</a> 对象减去一定数量的天, 月, 年, 时和秒数.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.timezone-version-get.html" class="function">timezone_version_get()</a></span>
     - 返回时区数据库的版本.
    </span>
   </li>
  </ul>

  <p class="simpara"><a href="book.gmp.html" class="link">GMP</a>:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.gmp-testbit.html" class="function">gmp_testbit()</a></span>
     - 测试一个比特是否被设置.
    </span>
   </li>
  </ul>

  <p class="simpara"><a href="book.hash.html" class="link">Hash</a>:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.hash-copy.html" class="function">hash_copy()</a></span>
     - 复制哈希环境.
    </span>
   </li>
  </ul>

  <p class="simpara"><a href="book.imap.html" class="link">IMAP</a>:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.imap-gc.html" class="function">imap_gc()</a></span>
     - 清除 IMAP 缓存.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><strong>imap_utf8_to_mutf7()</strong></span>
     - 编码 UTF-8 字符串为改进的 UTF-7 编码.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><strong>imap_mutf7_to_utf8()</strong></span>
     - 解码改进的 UTF-7 字符串为 UTF-8 编码.
    </span>
   </li>
  </ul>

  <p class="simpara"><a href="book.json.html" class="link">JSON</a>:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.json-last-error.html" class="function">json_last_error()</a></span>
     - 返回最后发生的 JSON 错误.
    </span>
   </li>
  </ul>

  <p class="simpara"><a href="book.mysqli.html" class="link">MySQL 改进</a>:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="mysqli-result.fetch-all.html" class="function">mysqli_fetch_all()</a></span>
     - 以关联数组、索引数组或者二者都有获取全部结果行.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="mysqli.get-connection-stats.html" class="function">mysqli_get_connection_stats()</a></span>
     - 返回客户端连接的统计资料.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="mysqli.poll.html" class="function">mysqli_poll()</a></span>
     - 轮询连接.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="mysqli.reap-async-query.html" class="function">mysqli_reap_async_query()</a></span>
     - 从异步查询中获取结果.
    </span>
   </li>
  </ul>

  <p class="simpara"><a href="book.openssl.html" class="link">OpenSSL</a>:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.openssl-random-pseudo-bytes.html" class="function">openssl_random_pseudo_bytes()</a></span>
     - 返回一个以伪随机字节填充的指定长度的字符串.
    </span>
   </li>
  </ul>

  <p class="simpara"><a href="book.pcntl.html" class="link">PCNTL</a>:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.pcntl-signal-dispatch.html" class="function">pcntl_signal_dispatch()</a></span>
     - 为挂起信号调用信号处理器.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.pcntl-sigprocmask.html" class="function">pcntl_sigprocmask()</a></span>
     - 设置和获取阻塞信号.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.pcntl-sigtimedwait.html" class="function">pcntl_sigtimedwait()</a></span>
     - 等待信号, 但是有超时时间.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.pcntl-sigwaitinfo.html" class="function">pcntl_sigwaitinfo()</a></span>
     - 等待信号.
    </span>
   </li>
  </ul>

  <p class="simpara"><a href="book.pcre.html" class="link">PCRE</a>:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.preg-filter.html" class="function">preg_filter()</a></span>
     - 执行正则查找和替换, 仅仅返回匹配正则的结果.
    </span>
   </li>
  </ul>

  <p class="simpara"><a href="book.sem.html" class="link">信号</a>:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.msg-queue-exists.html" class="function">msg_queue_exists()</a></span>
     - 检查消息队列是否存在.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.shm-has-var.html" class="function">shm_has_var()</a></span>
     - 检查在一个共享内存段中, 是否存在指定的键(key).
    </span>
   </li>
  </ul>

  <p class="simpara">
   以下函数被原生支持, 因此它们在所有运行 PHP 的操作系统上均可用.
  </p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.acosh.html" class="function">acosh()</a></span>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.asinh.html" class="function">asinh()</a></span>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.atanh.html" class="function">atanh()</a></span>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.expm1.html" class="function">expm1()</a></span>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.log1p.html" class="function">log1p()</a></span>
    </span>
   </li>
  </ul>
 </div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="migration53.parameters.html">新参数</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="migration53.new-stream-wrappers.html">新的流包装器</a></div>
 <div class="up"><a href="migration53.html">从 PHP 5.2.x 移植到 PHP 5.3.x</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
